package com.aaron.gesturehelper.gesturelib;

import java.io.DataInputStream;
import java.io.IOException;

public class MyGesturePoint {
    public  float x;
    public  float y;

    public final long timestamp;

    public MyGesturePoint(float x, float y, long t) {
        this.x = x;
        this.y = y;
        timestamp = t;
    }

    static MyGesturePoint deserialize(DataInputStream in) throws IOException {
        // Read X and Y
        final float x = in.readFloat();
        final float y = in.readFloat();
        // Read timestamp
        final long timeStamp = in.readLong();
        return new MyGesturePoint(x, y, timeStamp);
    }
    
    @Override
    public Object clone() {
        return new MyGesturePoint(x, y, timestamp);
    }
}
